import type { MenuItem, OrderLineItem, OrderRecord, ReviewRecord } from "./entities";

export interface MenuListResponse {
  menu: MenuItem[];
}

export interface MenuSavePayload {
  _id?: string;
  name?: string;
  categoryKey?: string;
  description?: string;
  coverUrl?: string;
  stock?: number;
  funValue?: number;
  isActive?: boolean;
}

export interface MenuSaveResponse {
  menu: MenuItem;
}

export interface MenuCreatePayload {
  name: string;
  categoryKey: string;
  description: string;
  coverUrl: string;
  stock: number;
  funValue: number;
  isActive?: boolean;
}

export interface MenuRemovePayload {
  menuId: string;
}

export interface MenuRemoveResponse {
  menuId: string;
}

export interface OrderListParams {
  role: "chef" | "diner";
  status?: "pending" | "accepted" | "rejected" | "cooking" | "completed";
}

export interface OrderListResponse {
  orders: OrderRecord[];
}

export interface OrderSubmitItemPayload {
  menuId: string;
  quantity: number;
}

export interface OrderSubmitPayload {
  items: OrderSubmitItemPayload[];
  note?: string;
}

export interface OrderSubmitResponse {
  order: OrderRecord;
}

export interface OrderAcceptPayload {
  orderId: string;
}

export interface OrderRejectPayload {
  orderId: string;
  reason: string;
}

export interface OrderUpdateResponse {
  order: OrderRecord;
}

export interface ReviewSubmitPayload {
  orderId: string;
  rating: number;
  comment: string;
}

export interface ReviewSubmitResponse {
  order: OrderRecord;
}
